package com.woniuxy.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 菜品月销量表 前端控制器
 * </p>
 *
 * @author psy
 * @since 2022-06-28
 */
//@Api(tags = "菜品月销操作接口,菜品月销的增删改查")
@RestController
@RequestMapping("/foodMonthSale")
public class FoodMonthSaleController {
//    @Autowired
//    private FoodMonthSaleService foodMonthSaleService;
//
//    @ApiOperation("菜品月销新增")
//    @PostMapping("add")
//    public Result addProduct(@RequestBody MothSaleForm mothSaleForm) {
//        return Result.success(200, "菜品月销新增成功",
//                foodMonthSaleService.addMonthSale(mothSaleForm));
//    }
//
//    @ApiOperation("根据id,删除菜品月销")
//    @ApiImplicitParam(name = "id", value = "菜品月销id")
//    @DeleteMapping("del/{id}")
//    public Result delProduct(@PathVariable String id) {
//        if (id.equals("") || id.equals("undefined"))
//            return Result.fail(500, "该菜品月销不存在");
//        if (foodMonthSaleService.delMonthSaleById(Long.parseLong(id)))
//            return Result.success(200, "菜品月销删除成功", null);
//        return Result.fail(500, "菜品月销删除失败");
//    }
//
//    @ApiOperation("菜品月销修改")
//    @PutMapping("update")
//    public Result updateProduct(@RequestBody MothSaleForm mothSaleForm) {
//        return Result.success(200, "修改成功",
//                foodMonthSaleService.updateMonthSale(mothSaleForm));
//    }
//
//    @ApiOperation("根据商家id,查询菜品月销")
//    @ApiImplicitParam(name = "storeId", value = "商家id")
//    @GetMapping("list/{storeId}")
//    public Result getProducts(@PathVariable String storeId) {
//        if (storeId.equals("") || storeId.equals("undefined"))
//            return Result.fail(500, "该商家不存在");
//        return Result.success(200, "",
//                foodMonthSaleService.getMonthSaleByStoreId(Long.parseLong(storeId)));
//    }
}

